package net.zjitc.mapper;

import net.zjitc.pojo.Cart;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author admin
 * @Date 2019/4/16 11:38
 */
public interface CartMapper {
    Cart findProductBelongToCurrentUser(@Param("pid") String pid,
                                        @Param("uid") Integer uid);

    int updateQuantity(Cart cart);

    int addNewProductToCart(Cart cart);

    List<Cart> findProductsByUid(Integer uid);

    int deleteItemById(Integer id);

    int deleteCartByUid(int id);
}
